/*
 * GetConsejoAction.java
 *
 * Created on 11 de noviembre de 2007, 18:47
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package webportlet.model.portletfacade.plain.action;

import java.sql.Connection;
import webportlet.model.consejo.dao.SQLConsejoDAO;
import webportlet.model.consejo.dao.SQLConsejoDAOFactory;
import webportlet.model.util.InstanceNotFoundException;
import webportlet.model.util.InternalErrorException;
import webportlet.model.util.NonTransactionalPlainAction;

/**
 *
 * @author Administrador
 */

public class GetConsejoAction implements NonTransactionalPlainAction{

    
     private Long id ;

       
    public GetConsejoAction(Long id) {
        this.id = id;
    }
    
    public Object execute(Connection connection) 
        throws InstanceNotFoundException, InternalErrorException {
                
        SQLConsejoDAO consejoDAO = SQLConsejoDAOFactory.getDAO();
            
        return consejoDAO.find(connection, id);                

    }
    
}
